﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GCELibrary.Current;

using System.Linq.Dynamic;
using System.Linq.Expressions;
using ZF.BLL.Linq;
using ZF.BLL;
using GCELibrary.Current;
using ZF.BLL.Page;
namespace ZF.WS.shop
{
    public partial class ft :PageBase
    {
        [PageArgument(Key = "id", CanNull = false)]
        public int FreightId { get; set; }

        public Model.SP_Freight Freight { get; set; }
        public List<Keyword<string>> Settings { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            using (var dc = SiteInfo.CreateDBDataContext())
            {
                Freight=dc.SP_Freight.FirstOrDefault(p => p.FreightId == FreightId);
                if (Freight == null)
                    throw WarnFactory.CreateWarn(WarnCode.ReocrdNoFind);
                Settings = Freight.Json.JsonConvert<List<Keyword<string>>>();
            }
        }
    }
}
